namespace HashFoo.Rest.Common
{
    /// <summary>
    /// Defines a sort descriptor for a property on the query result model.
    /// </summary>
    public class SortDescriptor
    {
        /// <summary>
        /// The property name to apply the sort description to.
        /// </summary>
        public string PropertyName { get; set; }

        /// <summary>
        /// The sort direction.
        /// </summary>
        public SortDirection Direction { get; set; }
    }

    /// <summary>
    /// Defines the direction of a <see cref="SortDescriptor"/>.
    /// </summary>
    public enum SortDirection
    {
        /// <summary>
        /// Sort ascending.
        /// </summary>
        Ascending,

        /// <summary>
        /// Sort decending.
        /// </summary>
        Descending
    }
}